#ifndef __G_INPUT_MODULE_H__
#define __G_INPUT_MODULE_H__

#include <string>
#include <vector>
#include <unordered_map>

#include "GTypes.h"
#include "GModule.h"

#include "GInitializable.h"
#include "GBitContainer.h"

namespace GEngine
{
	class GInputDevice;

	class GInputModule : public GModule
	{
	G_MODULE(GInputModule);
	
	friend class GInputManager;

	typedef std::unordered_map<std::string, GInputDevice*> DeviceMap;
	
	protected:
		DeviceMap		ModuleDevices;

						GInputModule();
		virtual			~GInputModule();

		void			RegisterDevice(const char* Name, GInputDevice* Device);
		void			UnregisterDevice(const char* Name);

	public:
		GInputDevice*	GetDevice(const char* Name) const;

		virtual void	Reset();
		virtual bool	Update(float ElapsedTime) OVERRIDE;
		
		virtual bool	Initialize() OVERRIDE;	
		virtual void	Uninitialize() OVERRIDE;

	};

}

#endif